program Pii;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x, y, p: real;
  i, j, n0, n: integer;

begin
  randomize;
  n:=0;
  n0:=0;
  for i:=1 to 10000 do
  begin
    for j:=1 to 1000 do
    begin
      x:=2*random;
      y:=2*random;
      if ((x-1)*(x-1)+(y-1)*(y-1)<1) then
        n0:=n0+1;
      n:=n+1;
      begin
        p:=4*n0/n;
        writeln(p);
      end;
    end;
  end;
  readln;

end.
